package com.cms.common.model.repository;


import com.cms.common.model.entity.Permission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface PermissionRepository extends JpaSpecificationExecutor<Permission>, JpaRepository<Permission, Long>, PagingAndSortingRepository<Permission, Long> {

    List<Permission> findAllByPluginId(String PluginId);

    List<Permission> findAllByIdIn(List<Long> ids);

    List<Permission> findAllByPluginIdIsNull();
    List<Permission> findAllByPluginIdIsNotNull();

}